
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.logging.Level;
import java.util.logging.Logger;







/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

    
/**
 *
 * @author Irena
 */
public class Connector {
    
    private static Connection conn;

    private static void initConnection() {
        try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            conn = DriverManager.getConnection("jdbc:mysql://92.37.55.48/is", "irena", "mojairena");
        } catch (Exception e) {
            conn = null;
        }
    }
    
    public static Connection vrniPovezavo() {
        if(conn == null) 
            initConnection();
        return conn;
    }
    
    
}
